package com.github.ecbp.user.service.dto;

import com.github.ecbp.common.req.BaseIdDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

@Data
@ApiModel
public class PermissionDto extends BaseIdDTO {

    @ApiModelProperty(value = "前端权限名")
    private String name;

    /**
     * 权限标题
     */
    @ApiModelProperty(value = "权限标题", required = true)
    @NotEmpty
    private String title;

    @ApiModelProperty(value = "权限权限字符串", required = true)
    @NotEmpty
    private String power;

    @ApiModelProperty(value = "菜单ID", required = true)
    @NotNull
    private Long menuId;

    /**
     * 权限URL
     */
    @ApiModelProperty(value = "资源ID列表")
    private List<Long> resourceIds;

    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    private String description;

    /**
     * 排序
     */
    @ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 启用状态；0->禁用；1->启用
     */
    @ApiModelProperty(value = "启用状态")
    private Integer status;
}
